package com.cneport.das.common.model.trans;

import com.cneport.das.common.validate.FieldCheck;
import com.cneport.das.common.validate.FvEnum;
import com.cneport.das.common.validate.Regexs;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 * @Desc ERP回执查询的请求报文对象
 * @Ver 1.0
 * @Author GavinZhang
 * @Company 东方物通科技有限（北京）公司
 * @Date 2021-12-20 15:56:18
 */
@Data
@XmlRootElement(name = "ErpGetRequest")
@XmlAccessorType(XmlAccessType.FIELD)
public class ErpGetRequest {

    private ReqHead reqHead;
    private AddInfos addInfos;

    @XmlType
    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class ReqHead {
        @FieldCheck(name = "全局ID", type = FvEnum.STRING, isNullable = false, length = 32)
        private String guid;
        @FieldCheck(name = "请求时间", type = FvEnum.DATE_STR, isNullable = false, regex = Regexs.C14)
        private String reqTime;
        private Integer maxCnt;
        private String senderId;
        @FieldCheck(name = "公司编号", type = FvEnum.STRING, isNullable = false)
        private String copNo;
    }


}
